package cn.hsa.fqz.task.service;

import cn.hsa.fqz.task.entity.TTaskMedcClueFeedbackAttachmentDO;
import cn.hsa.fqz.task.entity.TTaskMedcClueFeedbackDO;
import cn.hsa.fqz.task.service.dto.*;
import cn.hsa.hsaf.core.framework.util.CurrentUser;
import cn.hsa.hsaf.core.framework.util.PageResult;
import cn.hsa.hsaf.core.framework.web.WrapperResponse;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 *
 */
public interface TTaskMedcClueFeedbackService extends IService<TTaskMedcClueFeedbackDO> {

    /**
     * 查询所有线索反馈
     * @param sequenceNo
     * @return
     */
    List<TTaskMedcClueFeedbackDO> getLists(String sequenceNo);

    TTaskMedcClueFeedbackAttachmentDO getAttachmentByFeedbackAndFileNo(String fileNo, Integer feedbackId);

    /**
     * 查询所有线索反馈
     * @param medcCode
     * @param taskId
     * @return
     */
    List<TTaskMedcClueFeedbackDO> getLists(Integer taskId,String medcCode,Integer fxdj);

    Boolean isCheckNone(AddMedcFeedbackDTO create,String proviceCode,String cityCode);


    List<TaskMedcClueFeedbackStatisticDTO> getFeedbackStatisticByRegion(String host, Integer port,String pwd, LoginUserDTO loginUserDTO,String region, String taskCode);

    /**
     * 添加医药线索反馈
     * @param currentUser
     * @param create
     * @return
     */
    Boolean add(CurrentUser currentUser, AddMedcFeedbackDTO create);

    /**
     * 查询线索详情
     * @param feedbackId
     * @return
     */
    TTaskMedcClueFeedbackDO detail(Integer feedbackId);

    WrapperResponse<Boolean> delete(CurrentUser currentUser, Integer feedbackId);

    List<MedcFeedbackMinDTO> genMinDtosByTaskIdAndMedcCode(Integer taskId, List<Map<String,String>> medcCodes);

    PageResult<MedcFeedbackDetailsDTO> feedbackedPageList(LoginUserDTO loginUserDTO, TaskFeedbackQueryDTO dto);

    List<MedcFeedbackDetailsDTO> feedbackedList(LoginUserDTO loginUserDTO, TaskFeedbackQueryDTO dto);

   /* public static void main(String[] args) {
        List<Map<String,String>> medc = Lists.newArrayList();
        Map<String,String> mmp = new HashMap<>();
        mmp.put("medcCode", "H23401333");
        mmp.put("fxdj", "2");
        medc.add(mmp);
        Map<String,String> mmp1 = new HashMap<>();
        mmp1.put("medcCode", "H234013334");
        mmp1.put("fxdj", "1");
        medc.add(mmp1);
        System.out.println(JSON.toJSONString(medc));
    }*/
}
